package day1217;

import java.util.Arrays;

public class Test4 {
    public static void main(String[] args) {
        //1.定义一个double数组，表示一组温度值。
        double[]  temps={3.8,  2.9,  2.1};
        //2.取出每个温度值打印
        //查询
        System.out.println(temps[0]);
        System.out.println(temps[1]);
        System.out.println(temps[2]);

        //temps[0]
        for( int i=0 ; i<=2;  i= i+1) {
            System.out.println(temps[i]);
        }
        //3.







        int[]     ids=new int[4];
        System.out.println(ids[2]);
        System.out.println(ids[3]);
        //System.out.println(ids[4]);





        boolean[] bs=new boolean[5];
        //boolean类型的数组默认值是：false
        System.out.println(  bs[0]  );
        System.out.println(  bs[4]  );




        boolean[] bs2=new boolean[5];
        //5个false

        bs2[4]=true;



        double[]  es={3.2,    7.6};
        es[0]=4.5;//加入，  修改
        System.out.println(es[0]);//4.5
        System.out.println(es[1]);//7.6

    }
}
